using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;

namespace QLTV.Reports
{
    public partial class rptTongHop : DevExpress.XtraReports.UI.XtraReport
    {
        public rptTongHop()
        {
            InitializeComponent();
            bind();
        

        }
        public void bind()
        {
            //onboard list
            ((rpt)reportOnBoard.ReportSource).loadData();
            ((rptNewCrew)reportNewCrew.ReportSource).loadData();
            lblNgay.Text = DateTime.Now.Date.ToString("dd-MM-yy");
            lblEmployee.Text = Program.EmployeeName;
            ((rptSumary)reportSumary.ReportSource).loadData();
            ((rptVesselGroupSummary)reportVesselGroup.ReportSource).loadData();


        }
    
        int _stt = 0;
        private void Detail1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            _stt++;
            stt.Text = String.Format("2.{0}.", _stt);
            if (vacationDetail.GetCurrentColumnValue("Department") != null)
            {
                ((rptVactionList)reportVacation.ReportSource).loadData(vacationDetail.GetCurrentColumnValue("Department").ToString());
            }

        }

  
    }
}

